package com.example.demo.service.impl;

import com.example.demo.dto.Card;
import com.example.demo.service.BaseCardService;
import com.example.demo.service.LandlordService;
import org.springframework.stereotype.Service;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 斗地主
 * @author user
 */
@Service
public class LandlordServiceImpl implements LandlordService {

    private Map<String, Table> tables = new ConcurrentHashMap<>();

    @Override
    public void distributeCard(int num, int remainCardNum) {

    }

    @Override
    public void add(String userId, String tableId) {

    }

    @Override
    public void quit() {

    }

    @Override
    public void play(String userId, Card card) {

    }

    class Table {
        private List<String> participatorList;

        private Card latestCard;

        private String currentPlayingUser;

        private String landlordUser;



    }

    /**
     * 单向链表
     */
    class Participator {

        private Boolean isLandlord;

        private String userId;

        private Participator next;

    }
}
